import request from '@/utils/request'

// 查询请假审批规则列表
export function listLeaveApprova(query) {
  return request({
    url: '/hr/leaveApprova/list',
    method: 'get',
    params: query
  })
}

// 查询请假审批规则详细
export function getLeaveApprova(id) {
  return request({
    url: '/hr/leaveApprova/' + id,
    method: 'get'
  })
}

// 新增请假审批规则
export function addLeaveApprova(data) {
  return request({
    url: '/hr/leaveApprova',
    method: 'post',
    data: data
  })
}

// 修改请假审批规则
export function updateLeaveApprova(data) {
  return request({
    url: '/hr/leaveApprova',
    method: 'put',
    data: data
  })
}

// 删除请假审批规则
export function delLeaveApprova(id) {
  return request({
    url: '/hr/leaveApprova/' + id,
    method: 'delete'
  })
}
